package com.dd.common.dto.system.job;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

/**
 * @author cheng
 */
@Schema(description = "定时任务查询DTO")
@Data
public class SysJobQueryDTO implements java.io.Serializable {

    @Schema(description = "任务名称", example = "用户同步任务")
    private String jobName;

    @Schema(description = "任务组名", example = "DEFAULT")
    private String jobGroup;
    @Schema(description = "错失触发策略：1-立即触发，2-忽略", example = "1")
    @Range(min = 1, max = 2, message = "错失触发策略值只能是1或2")
    private Integer misfirePolicy;

    @Schema(description = "是否允许并发：0-否，1-是", example = "1")
    @Range(min = 0, max = 1, message = "是否允许并发值只能是0或1")
    private Integer concurrent;

    @Schema(description = "状态：0-暂停，1-正常", example = "1")
    @Range(min = 0, max = 1, message = "状态值只能是0或1")
    private Integer status;
}
